﻿
// 2023/2/28: 首个版本
// 2023/7/31: 新增isSupported
// 2023/8/22: 修正isSupported，并改为静态

#ifndef H264_ENCODER_CPU_H_
#define H264_ENCODER_CPU_H_

#include "spadas.h"
#include "NextCompatibleImage.h"

namespace videonext
{
	using namespace spadas;

	// Only for non-commercial use
	class H264EncoderCPU : public Object<class H264EncoderCPUVars>
	{
	public:
		H264EncoderCPU();
		static Bool isSupported();
		Bool open(Size2D frameSize);
		void close();
		// input: ImagePointerColor, IplImageColor or AVFrameYUV420P
		Bool send(CompatibleImage image, Double time);
		void flush();
		Bool receive(Binary& packetData, Double& time);
	};
}

#endif